/*流星动态样式*/

/* 登录容器样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-box h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 表单标签切换 */
.form-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #fff;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
}

/* 表单样式 */
.form {
    display: none;
}

.form.active {
    display: block;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me label {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* 按钮样式 */
.login-btn,
.register-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover,
.register-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* 表单底部链接 */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 错误消息样式 */
.error-message {
    color: #e73c7e;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-box {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 35px;
    }
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    margin-top: 0.5rem;
    border-radius: 2px;
    background: #eee;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
}

.strength-weak { width: 33.33%; background: #e74c3c; }
.strength-medium { width: 66.66%; background: #f1c40f; }
.strength-strong { width: 100%; background: #2ecc71; }

/* 加载动画 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

/* 动画效果 */
@keyframes rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* 动画效果 */
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateX(1000px) translateY(1000px) rotate(45deg);
        opacity: 0;
    }
}

/* 添加星星和流星的JavaScript */
.star {
    --duration: 3s;
    --delay: 0s;
}

.shooting-star {
    --duration: 4s;
    --delay: 0s;
}

/* 星空背景 */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #000;
    overflow: hidden;
    position: relative;
}

/* 星星容器 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* 星星样式 */
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

/* 流星样式 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, #fff 100%);
    animation: shooting var(--duration) linear infinite;
    opacity: 0;
}

/* 动画效果 */
@keyframes twinkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes shooting {
    0% {
        transform: translateX(0) translateY(0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateX(1000px) translateY(1000px) rotate(45deg);
        opacity: 0;
    }
}

/* 星星和流星的动画变量 */
.star {
    --duration: 3s;
    --delay: 0s;
}

.shooting-star {
    --duration: 4s;
    --delay: 0s;
} 